package com.qf.mq.listener;

import com.qf.events.ExecFilterUpdateInputevent;
import com.qianfeng.smsplatform.common.constants.RabbitMqConsants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;


import com.qf.events.ExecFilterUpdateInputevent;
import com.qianfeng.smsplatform.common.constants.RabbitMqConsants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class ExecFilterUpdateInputListener {
    private ApplicationContext context;
    @Autowired
    public void setContext(ApplicationContext context) {
        this.context = context;
    }

    @StreamListener(RabbitMqConsants.TOPIC_EXECFILTERS_UPDATE)
    public void l(String msg){
        context.publishEvent(new ExecFilterUpdateInputevent());
    }
}
